<template>
  <div class="pro-list" @click="$router.push('/goodsdetail?id='+data.id)">
    <div class="top">
      <img v-show="data.isHotSale===1" class="hot-j" src="../../assets/images/home/hot-j.png" alt="" />
      <img v-show="data.isLatest===1" class="new-j" src="../../assets/images/home/new-j.png" alt="" />
      <img :src="data.coverImg |srcFormat" alt="" />
    </div>
    <div class="bottom">
      <p>{{data.name}}</p>
      <p>
        <span class="monadnum">{{data.coin}}</span>
        <img src="../../assets/images/home/monad.png" alt="" />
      </p>
      <div class="exchange">立即兑换</div>
    </div>
  </div>
</template>
 
<script>

export default {
    props:['data'],
  data() {
    return {
    };
  },
};
</script>
 
<style lang = "less" scoped>
.pro-list {
  width: 282px;
  margin: 0 20px 20px 0;
  transition: 0.6s;
  color: #333333;
  line-height: 23px;
  font-size: 18px;
  text-align: center;
  &:nth-child(4n){
    margin-right: 0;
  }
  &:hover {
    transform: translateY(-20px);
    cursor: pointer;
  }
  &:hover .exchange {
    background-color: #0a328e;
    color: #fff;
  }
}
.top {
  width: 100%;
  height: 250px;
  position: relative;
  overflow: hidden;
  .hot-j,.new-j {
    position: absolute;
    left: 0;
    top: 0;
    width: 58px;
    height: 58px;
  }
}
.bottom {
  box-sizing: border-box;
  padding-top: 20px;
  height: 162px;
  background: #ffffff;
  p {
    line-height: 30px;
  }
  .monadnum {
    color: #ff5e0f;
    margin-right: 8px;
    font-weight: bold;
  }
  img {
    width: 20px;
    height: 20px;
  }
  .exchange {
    width: 100px;
    height: 36px;
    line-height: 36px;
    border: 1px solid #0a328e;
    text-align: center;
    color: #0a328e;
    margin: 16px auto;
  }
}
</style>